#ifndef _STACK_H_
#define _STACK_H_

#include <stdlib.h>
#include "list.h"

typedef list_t stack_t;


#define stack_init		list_init
#define stack_destroy	list_destroy

int stack_push(stack_t *stack, const void *data);
int stack_pop(stack_t *stack, void **data);

#define stack_peek(stack)		((stack)->head ? (stack)->head->data : NULL)
#define stack_size				list_size


#endif /*_STACK_H_*/

